﻿using AyaWo.Commen;
using AyaWo.DbF;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AyaWo.DAL
{
    /// <summary>
    /// 基础服务
    /// </summary>
   public class BaseService
    {
        /// <summary>
        /// 数据库连接
        /// </summary>
        public static IDbHelper Db
        {
            get
            {
                try
                {
                    var va = DatHelper<ConnStr>.GetDat("connStr.dat");
                    if (va != null)
                    {
                        return new DbHelper(va.connstr,va.DbType);
                    }
                    return null;
                }
                catch (Exception ex)
                {
                    Log.Error(ex.Message);
                    return null;
                }
            }
            private set
            {
            }
        }
    }
}
